Skip to content

Add dotnet target framework badge#11949

Draft
LuxologyGG wants to merge 1 commit into
badges:masterfrom
LuxologyGG:feat/auto-badge-issue-6934
Draft

Add dotnet target framework badge#11949
LuxologyGG wants to merge 1 commit into
badges:masterfrom
LuxologyGG:feat/auto-badge-issue-6934

Conversation

@LuxologyGG

Copy link
Copy Markdown

Summary

Implements a new platform-support badge for .NET target frameworks, addressing #6934.

Badge routes

  • /dotnet/v/:packageName — target frameworks for the latest stable NuGet package version
  • /dotnet/vpre/:packageName — target frameworks for the latest version including prereleases

Example

https://img.shields.io/dotnet/v/Humanizer.Core

Shows supported target frameworks (e.g. net48 | net8.0 | netstandard2.0) from the NuGet registration API dependency groups.

Implementation notes

  • Fetches package metadata from the NuGet registration5-gz-semver2 API
  • Normalizes framework monikers (e.g. .NETFramework4.8net48) for consistent display
  • Handles dependency groups with no targetFramework as all, per NuGet API semantics
  • Follows the pipe-separated display pattern used by other platform-support badges (e.g. PyPI pyversions)

Tests

  • Unit tests in services/dotnet/dotnet.service.spec.js
  • Integration tests in services/dotnet/dotnet.tester.js

Closes #6934

Implement a platform-support badge that reads .NET target frameworks from
the NuGet registration API for a given package. Supports stable (v) and
prerelease (vpre) version selection, following the pipe-separated display
pattern used by other platform-support badges.
@github-actions

Copy link
Copy Markdown
Contributor
Warnings
⚠️

This PR modified service code.
Please run tests by including affected services in the pull request title.

Messages
📖 ✨ Thanks for your contribution to Shields, @LuxologyGG!

Generated by 🚫 dangerJS against 2cd77cc

@LitoMore

Copy link
Copy Markdown
Member

@LuxologyGG Can you go back and take a look at the PRs you created earlier before creating more?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Badge request: dotnet version

3 participants